package com.yunxi.service.localService.impl.otd;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.otd.OtdWeekPlanDetailMapper;
import com.yunxi.model.otd.OtdWeekPlanDetail;
import com.yunxi.otd.pojo.OtdWeekPlanDetailVO;
import com.yunxi.service.localService.otd.OtdWeekPlanDetailService;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 周度需求计划明细 服务实现类
 * </p>
 *
 * @author
 * @since 2019-05-09
 */
@Service
public class OtdWeekPlanDetailServiceImpl extends ServiceImplPlus<OtdWeekPlanDetailMapper, OtdWeekPlanDetail> implements
    OtdWeekPlanDetailService {

    @Override
    public List<OtdWeekPlanDetailVO> findDetailList(String weekPlanCode) {
        return baseMapper.selectDetailListByCode(weekPlanCode);
    }

    @Override
    public void removeDetailByCode(String weekPlanDetailCode) {
        baseMapper.deleteDetailListByCode(weekPlanDetailCode);
    }

    @Override
    public void updateDetailSumNum(String detailCode,String realName) {
        baseMapper.updateDetailSumNum(detailCode, realName);
    }

    @Override
    public OtdWeekPlanDetail findDetail(String weekPlanCode, String productCode, String customPackCode) {
        return baseMapper.selectDetail(weekPlanCode, productCode,customPackCode);
    }

    @Override
    public void removeDetailByWeekPlanCode(String weekPlanCode) {
        baseMapper.deleteDetailByWeekPlanCode(weekPlanCode);
    }
}
